/*
 * Name: Andrew Billy
 * File: General.js
 * A central location for general javascript functions
 */

$(document).ready(function(){
    $('#login-trigger').click(function(){ //BEGIN LOGIN DROPDOWN//
    	 
            $(this).next('#login-content').slideToggle();
            $(this).toggleClass('active');                                  

            if ($(this).hasClass('active')) 
            	$(this).find('span').html('&#x25B2;');
            else 
                $(this).find('span').html('&#x25BC;');
            }); //END LOGIN DROPDOWN
    
    //BEGIN MAINBODY SIZING
    
    	
		    var dHeight = $(document).height();
			var hHeight = $('#header').height();
			var wHeight = $(window).height();
			
			var tH = dHeight - hHeight;
			$('#mainBody').css('height',tH+'px');
		    $('#mainBody').css('top',hHeight+'px');
		    $(window).resize(function () {
		    	
		    	$('#mainBody').css('height',tH+'px');
		    	$('#mainBody').css('top',hHeight+'px');
		    	});
				
    //END MAINBODY SIZING
	
    // Fade Return Status//
		    
		        $('.fade').fadeIn(1500).delay(5000).fadeOut(2500);
		    		    
		    
    	});



